package com.howie.parnote.util;


import com.howie.parnote.module.SharerModule;

import javax.servlet.http.HttpSession;

/**
 * <p>Title: parnote</p>
 * <p>
 * Description: parnote
 * </p>
 *
 * @author huangyan
 *         Created by HY on 2014/12/18 0018.
 * @version v1.0.0
 */
public class SharerUtil {
	private static final String SHARER = "sharer";

	public static void saveSharer2Session(SharerModule sharer, HttpSession session) {
		session.setAttribute(SHARER, sharer);
	}

	public static SharerModule getSharer(HttpSession session) {
		return (SharerModule) session.getAttribute(SHARER);
	}

	public static void removeSharerFromSession(HttpSession session) {
		session.removeAttribute(SHARER);
	}
}
